<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
	<title>cat datafeeds API | ElasticSearch 7.7 权威指南中文版</title>
	<meta name="keywords" content="ElasticSearch 权威指南中文版, elasticsearch 7, es7, 实时数据分析，实时数据检索" />
    <meta name="description" content="ElasticSearch 权威指南中文版, elasticsearch 7, es7, 实时数据分析，实时数据检索" />
    <!-- Give IE8 a fighting chance -->
    <!--[if lt IE 9]>
    <script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script>
    <script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
    <![endif]-->
	<link rel="stylesheet" type="text/css" href="../static/styles.css" />
	<script>
	var _link = 'cat-datafeeds.html';
    </script>
</head>
<body>
<div class="main-container">
    <section id="content">
        <div class="content-wrapper">
            <section id="guide" lang="zh_cn">
                <div class="container">
                    <div class="row">
                        <div class="col-xs-12 col-sm-8 col-md-8 guide-section">
                            <div style="color:gray; word-break: break-all; font-size:12px;">原英文版地址: <a href="https://www.elastic.co/guide/en/elasticsearch/reference/7.7/cat-datafeeds.html" rel="nofollow" target="_blank">https://www.elastic.co/guide/en/elasticsearch/reference/7.7/cat-datafeeds.html</a>, 原文档版权归 www.elastic.co 所有<br/>本地英文版地址: <a href="../en/cat-datafeeds.html" rel="nofollow" target="_blank">../en/cat-datafeeds.html</a></div>
                        <!-- start body -->
                  <div class="page_header">
<strong>重要</strong>: 此版本不会发布额外的bug修复或文档更新。最新信息请参考 <a href="https://www.elastic.co/guide/en/elasticsearch/reference/current/index.html" rel="nofollow">当前版本文档</a>。
</div>
<div id="content">
<div class="breadcrumbs">
<span class="breadcrumb-link"><a href="index.html">Elasticsearch Guide [7.7]</a></span>
»
<span class="breadcrumb-link"><a href="rest-apis.html">REST APIs</a></span>
»
<span class="breadcrumb-link"><a href="cat.html">cat APIs</a></span>
»
<span class="breadcrumb-node">cat datafeeds API</span>
</div>
<div class="navheader">
<span class="prev">
<a href="cat-dfanalytics.html">« cat data frame analytics API</a>
</span>
<span class="next">
<a href="cat-fielddata.html">cat fielddata API »</a>
</span>
</div>
<div class="section xpack">
<div class="titlepage"><div><div>
<h2 class="title">
<a id="cat-datafeeds"></a>cat datafeeds API<a class="edit_me edit_me_private" rel="nofollow" title="Editing on GitHub is available to Elastic" href="https://github.com/elastic/elasticsearch/edit/7.7/docs/reference/cat/datafeeds.asciidoc">edit</a><a class="xpack_tag" href="https://www.elastic.co/subscriptions"></a>
</h2>
</div></div></div>

<p>Returns configuration and usage information about datafeeds.</p>
<div class="section">
<div class="titlepage"><div><div>
<h3 class="title">
<a id="cat-datafeeds-request"></a>Request<a class="edit_me edit_me_private" rel="nofollow" title="Editing on GitHub is available to Elastic" href="https://github.com/elastic/elasticsearch/edit/7.7/docs/reference/cat/datafeeds.asciidoc">edit</a>
</h3>
</div></div></div>
<p><code class="literal">GET /_cat/ml/datafeeds/&lt;feed_id&gt;</code><br></p>
<p><code class="literal">GET /_cat/ml/datafeeds</code></p>
</div>

<div class="section">
<div class="titlepage"><div><div>
<h3 class="title">
<a id="cat-datafeeds-prereqs"></a>Prerequisites<a class="edit_me edit_me_private" rel="nofollow" title="Editing on GitHub is available to Elastic" href="https://github.com/elastic/elasticsearch/edit/7.7/docs/reference/cat/datafeeds.asciidoc">edit</a>
</h3>
</div></div></div>
<div class="ulist itemizedlist">
<ul class="itemizedlist">
<li class="listitem">
If the Elasticsearch security features are enabled, you must have <code class="literal">monitor_ml</code>,
<code class="literal">monitor</code>, <code class="literal">manage_ml</code>, or <code class="literal">manage</code> cluster privileges to use this API. See
<a class="xref" href="security-privileges.html" title="Security privileges">Security privileges</a> and <a href="https://www.elastic.co/guide/en/machine-learning/7.7/setup.html" class="ulink" target="_top">Set up machine learning features</a>.
</li>
</ul>
</div>
</div>

<div class="section">
<div class="titlepage"><div><div>
<h3 class="title">
<a id="cat-datafeeds-desc"></a>Description<a class="edit_me edit_me_private" rel="nofollow" title="Editing on GitHub is available to Elastic" href="https://github.com/elastic/elasticsearch/edit/7.7/docs/reference/cat/datafeeds.asciidoc">edit</a>
</h3>
</div></div></div>
<p>Datafeeds retrieve data from Elasticsearch for analysis by anomaly detection jobs. For more
information, see <a href="https://www.elastic.co/guide/en/machine-learning/7.7/ml-dfeeds.html" class="ulink" target="_top">Datafeeds</a>.</p>
<div class="note admon">
<div class="icon"></div>
<div class="admon_content">
<p>This API returns a maximum of 10,000 jobs.</p>
</div>
</div>
</div>

<div class="section">
<div class="titlepage"><div><div>
<h3 class="title">
<a id="cat-datafeeds-path-params"></a>Path parameters<a class="edit_me edit_me_private" rel="nofollow" title="Editing on GitHub is available to Elastic" href="https://github.com/elastic/elasticsearch/edit/7.7/docs/reference/cat/datafeeds.asciidoc">edit</a>
</h3>
</div></div></div>
<div class="variablelist">
<dl class="variablelist">
<dt>
<span class="term">
<code class="literal">&lt;feed_id&gt;</code>
</span>
</dt>
<dd>
(Optional, string)
A numerical character string that uniquely identifies the
datafeed. This identifier can contain lowercase alphanumeric characters (a-z
and 0-9), hyphens, and underscores. It must start and end with alphanumeric
characters.
</dd>
</dl>
</div>
</div>

<div class="section">
<div class="titlepage"><div><div>
<h3 class="title">
<a id="cat-datafeeds-query-params"></a>Query parameters<a class="edit_me edit_me_private" rel="nofollow" title="Editing on GitHub is available to Elastic" href="https://github.com/elastic/elasticsearch/edit/7.7/docs/reference/cat/datafeeds.asciidoc">edit</a>
</h3>
</div></div></div>
<div class="variablelist">
<dl class="variablelist">
<dt>
<span class="term">
<code class="literal">allow_no_datafeeds</code>
</span>
</dt>
<dd>
<p>
(Optional, boolean)
Specifies what to do when the request:
</p>
<div class="ulist itemizedlist">
<ul class="itemizedlist">
<li class="listitem">
Contains wildcard expressions and there are no datafeeds that match.
</li>
<li class="listitem">
Contains the <code class="literal">_all</code> string or no identifiers and there are no matches.
</li>
<li class="listitem">
Contains wildcard expressions and there are only partial matches.
</li>
</ul>
</div>
<p>The default value is <code class="literal">true</code>, which returns an empty <code class="literal">datafeeds</code> array when
there are no matches and the subset of results when there are partial matches.
If this parameter is <code class="literal">false</code>, the request returns a <code class="literal">404</code> status code when there
are no matches or only partial matches.</p>
</dd>
<dt>
<span class="term">
<code class="literal">format</code>
</span>
</dt>
<dd>
(Optional, string) Short version of the
<a href="https://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html" class="ulink" target="_top">HTTP accept header</a>.
Valid values include JSON, YAML, etc.
</dd>
<dt>
<span class="term">
<code class="literal">h</code>
</span>
</dt>
<dd>
<p>
(Optional, string) Comma-separated list of column names to display.
</p>
<p>If you do not specify which columns to include, the API returns the default
columns. If you explicitly specify one or more columns, it returns only the
specified columns.</p>
<p>Valid columns are:</p>
<div class="variablelist">
<dl class="variablelist">
<dt>
<span class="term">
<code class="literal">assignment_explanation</code>, <code class="literal">ae</code>
</span>
</dt>
<dd>
For started datafeeds only, contains messages relating to the selection of a
node.
</dd>
<dt>
<span class="term">
<code class="literal">buckets.count</code>, <code class="literal">bc</code>, <code class="literal">bucketsCount</code>
</span>
</dt>
<dd>
(Default)
The number of buckets processed.
</dd>
<dt>
<span class="term">
<code class="literal">id</code>
</span>
</dt>
<dd>
(Default)
A numerical character string that uniquely identifies the
datafeed. This identifier can contain lowercase alphanumeric characters (a-z
and 0-9), hyphens, and underscores. It must start and end with alphanumeric
characters.
</dd>
<dt>
<span class="term">
<code class="literal">node.address</code>, <code class="literal">na</code>, <code class="literal">nodeAddress</code>
</span>
</dt>
<dd>
<p>
The network address of the node.
</p>
<p>For started datafeeds only, this information pertains to the node upon which the
datafeed is started.</p>
</dd>
<dt>
<span class="term">
<code class="literal">node.ephemeral_id</code>, <code class="literal">ne</code>, <code class="literal">nodeEphemeralId</code>
</span>
</dt>
<dd>
<p>
The ephemeral ID of the node.
</p>
<p>For started datafeeds only, this information pertains to the node upon which the
datafeed is started.</p>
</dd>
<dt>
<span class="term">
<code class="literal">node.id</code>, <code class="literal">ni</code>, <code class="literal">nodeId</code>
</span>
</dt>
<dd>
<p>
The unique identifier of the node.
</p>
<p>For started datafeeds only, this information pertains to the node upon which the
datafeed is started.</p>
</dd>
<dt>
<span class="term">
<code class="literal">node.name</code>, <code class="literal">nn</code>, <code class="literal">nodeName</code>
</span>
</dt>
<dd>
<p>
The node name.
</p>
<p>For started datafeeds only, this information pertains to the node upon which the
datafeed is started.</p>
</dd>
<dt>
<span class="term">
<code class="literal">search.bucket_avg</code>, <code class="literal">sba</code>, <code class="literal">searchBucketAvg</code>
</span>
</dt>
<dd>
The average search time per bucket, in milliseconds.
</dd>
<dt>
<span class="term">
<code class="literal">search.count</code>, <code class="literal">sc</code>, <code class="literal">searchCount</code>
</span>
</dt>
<dd>
(Default)
The number of searches run by the datafeed.
</dd>
<dt>
<span class="term">
<code class="literal">search.exp_avg_hour</code>, <code class="literal">seah</code>, <code class="literal">searchExpAvgHour</code>
</span>
</dt>
<dd>
The exponential average search time per hour, in milliseconds.
</dd>
<dt>
<span class="term">
<code class="literal">search.time</code>, <code class="literal">st</code>, <code class="literal">searchTime</code>
</span>
</dt>
<dd>
The total time the datafeed spent searching, in milliseconds.
</dd>
<dt>
<span class="term">
<code class="literal">state</code>, <code class="literal">s</code>
</span>
</dt>
<dd>
<p>
(Default)
The status of the datafeed, which can be one of the following values:
</p>
<div class="ulist itemizedlist">
<ul class="itemizedlist">
<li class="listitem">
<code class="literal">starting</code>: The datafeed has been requested to start but has not yet started.
</li>
<li class="listitem">
<code class="literal">started</code>: The datafeed is actively receiving data.
</li>
<li class="listitem">
<code class="literal">stopping</code>: The datafeed has been requested to stop gracefully and is
completing its final action.
</li>
<li class="listitem">
<code class="literal">stopped</code>: The datafeed is stopped and will not receive data until it is
re-started.
</li>
</ul>
</div>
</dd>
</dl>
</div>
</dd>
<dt>
<span class="term">
<code class="literal">help</code>
</span>
</dt>
<dd>
(Optional, boolean) If <code class="literal">true</code>, the response includes help information. Defaults
to <code class="literal">false</code>.
</dd>
<dt>
<span class="term">
<code class="literal">s</code>
</span>
</dt>
<dd>
(Optional, string) Comma-separated list of column names or column aliases used
to sort the response.
</dd>
<dt>
<span class="term">
<code class="literal">time</code>
</span>
</dt>
<dd>
(Optional, <a class="xref" href="common-options.html#time-units" title="Time units">time units</a>)
Unit used to display time values.
</dd>
<dt>
<span class="term">
<code class="literal">v</code>
</span>
</dt>
<dd>
(Optional, boolean) If <code class="literal">true</code>, the response includes column headings.
Defaults to <code class="literal">false</code>.
</dd>
</dl>
</div>
</div>

<div class="section">
<div class="titlepage"><div><div>
<h3 class="title">
<a id="cat-datafeeds-example"></a>Examples<a class="edit_me edit_me_private" rel="nofollow" title="Editing on GitHub is available to Elastic" href="https://github.com/elastic/elasticsearch/edit/7.7/docs/reference/cat/datafeeds.asciidoc">edit</a>
</h3>
</div></div></div>
<div class="pre_wrapper lang-console">
<pre class="programlisting prettyprint lang-console">GET _cat/ml/datafeeds?v</pre>
</div>
<div class="console_widget" data-snippet="snippets/1354.console"></div>
<div class="pre_wrapper lang-console-result">
<pre class="programlisting prettyprint lang-console-result">id                              state buckets.count search.count
datafeed-high_sum_total_sales stopped 743          7
datafeed-low_request_rate     stopped 1457         3
datafeed-response_code_rates  stopped 1460         18
datafeed-url_scanning         stopped 1460         18</pre>
</div>
</div>

</div>
<div class="navfooter">
<span class="prev">
<a href="cat-dfanalytics.html">« cat data frame analytics API</a>
</span>
<span class="next">
<a href="cat-fielddata.html">cat fielddata API »</a>
</span>
</div>
</div>

                  <!-- end body -->
                        </div>
                        <div class="col-xs-12 col-sm-4 col-md-4" id="right_col">
                        
                        </div>
                    </div>
                </div>
            </section>
        </div>
    </section>
</div>
<script src="../static/cn.js"></script>
</body>
</html>